# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=attk
pkgver=2.0.1023
pkgrel=1
pkgdesc='Trend Micro Anti-Threat Toolkit.'
arch=('any')
groups=('blackarch' 'blackarch-scanner' 'blackarch-malware')
url='https://spnsupport.trendmicro.com/'
license=('custom:unknown')
options=('!strip')
source=("$pkgname-win::https://spnsupport.trendmicro.com/DownloadATTKHandler.ashx?uid=0c4b4ca2-f686-6b3c-50a6-f9e28f6e4722&b=64"
        "$pkgname-cli::https://spnsupport.trendmicro.com/DownloadATTKHandler.ashx?uid=bfed38f0-5fcd-7fb0-f2a4-6d99352fb1dd"
        "$pkgname-tui::https://spnsupport.trendmicro.com/DownloadATTKHandler.ashx?uid=cd391427-85bf-bbc2-6061-e6c1fe26db9b")
sha512sums=('9f95dc6349175d197e1332c6ea5350e11fca33cd48b39df36470530fdb41b149efa84874e7a6d822849b4c2862c8f255f4ab2b7e9fe516c579569b4757088a60'
            'd32579d6f42fd9c40f7b8ce390b6af5e58188e558e2d31a61dc0981e2cffac7b77efc483771d8d73941a54026e3a4955a872e876b7eb8053ee77552ee0e3915d'
            '976e848cc3b03b25f9de39ff29abf7685e4d6cc55c0e11b301385920b3081c3eed7e08312df762e4524a5a24ac8a56bc7eed065dc11e7857f905b40e332c91bc')

package() {
  install -dm 755 "$pkgdir/usr/share/$pkgname"

  install -Dm 755 "$pkgname-cli" "$pkgdir/usr/bin/$pkgname-cli"
  install -Dm 755 "$pkgname-tui" "$pkgdir/usr/bin/$pkgname-tui"
  install -Dm 644 license.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"

  cp --no-preserve=ownership "$pkgname-win" "$pkgdir/usr/share/$pkgname/"
}

